import sys
import os
import shutil

sys.path.append('/usr/lib64/freecad/lib/')
sys.path.append('/FreeCAD_build/lib/')

from cadparser import Step

name = 'box.stp'

path, basename = os.path.split(name)
filename = os.path.splitext(basename)[0]
#doc = Step.openFile('./data/step/box.stp')
stepFile = './test/data/step/' + name

doc = Step.openFile(stepFile)
doc.visualize()
tuoVisualPath = './test/data/TuoVisual/' + filename
if not os.path.exists(tuoVisualPath):
    os.makedirs(tuoVisualPath)
tuoVisualName = tuoVisualPath + '/' + filename

doc.exportTuoVisual(tuoVisualName)


